package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DouyinAuthorizationMapper;
import com.ruoyi.system.domain.DouyinAuthorization;
import com.ruoyi.system.service.IDouyinAuthorizationService;

/**
 * 抖音授权设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class DouyinAuthorizationServiceImpl implements IDouyinAuthorizationService
{
    @Autowired
    private DouyinAuthorizationMapper douyinAuthorizationMapper;

    /**
     * 通过id查询抖音授权设置
     *
     * @param id 抖音授权设置主键
     * @return 抖音授权设置
     */
    @Override
    public DouyinAuthorization selectDouyinAuthorizationById(Long id)
    {
        return douyinAuthorizationMapper.selectDouyinAuthorizationById(id);
    }

    /**
     * 通过门店名称查询抖音授权设置列表
     *
     * @param storeName 门店名称
     * @return 抖音授权设置
     */
    @Override
    public List<DouyinAuthorization> selectDouyinAuthorizationListByName(String storeName)
    {
        return douyinAuthorizationMapper.selectDouyinAuthorizationListByName(storeName);
    }

    /**
     * 新增抖音授权设置
     *
     * @param douyinAuthorization 抖音授权设置
     * @return 结果
     */
    @Override
    public int insertDouyinAuthorization(DouyinAuthorization douyinAuthorization)
    {
        return douyinAuthorizationMapper.insertDouyinAuthorization(douyinAuthorization);
    }

    /**
     * 修改抖音授权设置
     *
     * @param douyinAuthorization 抖音授权设置
     * @return 结果
     */
    @Override
    public int updateDouyinAuthorization(DouyinAuthorization douyinAuthorization)
    {
        return douyinAuthorizationMapper.updateDouyinAuthorization(douyinAuthorization);
    }

    /**
     * 通过id批量删除抖音授权设置信息
     *
     * @param ids 需要删除的抖音授权设置主键
     * @return 结果
     */
    @Override
    public int deleteDouyinAuthorizationByIds(Long[] ids)
    {
        return douyinAuthorizationMapper.deleteDouyinAuthorizationByIds(ids);
    }

    /**
     * 通过id删除抖音授权设置信息
     *
     * @param id 抖音授权设置主键
     * @return 结果
     */
    @Override
    public int deleteDouyinAuthorizationById(Long id)
    {
        return douyinAuthorizationMapper.deleteDouyinAuthorizationById(id);
    }
}
